package cn.zhb.backend.exception;

import cn.zhb.backend.utils.Result;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

/***
 *@Description
 *@Author ZHB
 *@Create 2025/5/11 下午3:54
 **/
@ControllerAdvice
@ResponseBody
public class SystemExceptionHandler {

    @ExceptionHandler(SystemException.class)
    public Result<?> handle(SystemException e){
        return Result.error(e.getMessage());
    }

}
